package com.liss.juc20211122.locks;

/**
 * javap -v/-c xxx.class
 *
 * ObjectMonitor.java(sun.jvm.hotspot.runtime;) -> objectMonitor.cpp ->objectMonitor.hpp
 */
public class LockByteCodeDemo {
    final Object object = new Object();

    public void m1() {

        synchronized (object){
            System.out.println("----------hello sync");
            throw new RuntimeException("----ex");
        }
    }

    public static void main(String[] args) {

    }
    public synchronized void m2(){

    }

    public static synchronized void m3(){

    }
}
